﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GetSmartIDEList.Lib.IOC
{
    public class ServiceProvider : IServiceProvider
    {
        private IContainer _Container = null;

        public ServiceProvider(IContainer container)
        {
            this._Container = container;
        }
        public object GetService(Type serviceType)
        {
            try
            {
                return this._Container.Resolve(serviceType);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                throw;
            }

            //return this._Container.Resolve(serviceType);
        }
    }



}
